<div id="nav-sec">
    <form>
        <div class="oauth-login-container" id="user_box">
            <div tabindex="0" class="oauth-login-options">
                        <span class="oauth-login-options-text">
                        <span class="oauth-login-options-text-icons">用户中心</span>
                        </span>
                <span title="Persona" data-next="{{ url(['for':'index']) }}" data-service="Persona"
                      class="oauth-icon oauth-persona launch-persona-login wait-for-persona"><i aria-hidden="true"
                                                                                                class="fa fa-user"></i></span>
            </div>
            <div aria-hidden="true" class="oauth-login-picker">
                <ul>
                    {% if user.isLogin() == true %}
                        <li class="wait-for-persona">
                            <a data-service="Persona" data-next="{{ url(['for':'index']) }}"
                               class="login-link launch-persona-login" href="{{ url(['for':'userCenterIndex']) }}">
                                <i aria-hidden="true" class="fa fa-user"></i>
                                资料设置
                            </a>
                        </li>
                        <li>
                            <a data-service="GitHub" class="login-link" href="#">
                                <i aria-hidden="true" class="fa fa-plus"></i>
                                个人主页
                            </a>
                        </li>
                    {% else %}
                        <li class="wait-for-persona">
                            <a data-service="Persona" data-next="{{ url(['for':'index']) }}"
                               class="login-link launch-persona-login" href="{{ url(['for':'login']) }}">
                                <i aria-hidden="true" class="fa fa-user"></i>
                                登陆
                            </a>
                        </li>
                        <li>
                            <a data-service="GitHub" class="login-link" href="{{ url(['for':'register']) }}">
                                <i aria-hidden="true" class="fa fa-plus"></i>
                                注册
                            </a>
                        </li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </form>
</div>
<nav id="main-nav" role="navigation">
    <ul>
        {{ view.r(menuRender('main')) }}
        <li class="nav-search-link"><a title="Search" href="/en-US/search"><i class="icon-search"
                                                                              aria-hidden="true"></i></a></li>
        <li class="main-nav-search">
            <form role="search" method="get" action="/en-US/search">
                <div class="search-wrap">
                    <label class="offscreen" for="main-q">请输入搜索关键字</label>
                    <input type="search" value="" data-value="" placeholder="请输入搜索关键字" name="q" id="main-q">
                    <span class="search-trigger"><i class="fa fa-search" aria-hidden="true"></i></span>&nbsp;
                    <button class="offscreen" type="submit">Search</button>
                </div>
            </form>
        </li>
    </ul>
</nav>
